package org.misty.practices;

public class Test {
    public static void main(String[] args) {
        int i = 1; // i = 1
        i = i++;   // i = 1
        int j = i++; // j = 1; i = 2;
        int k = i + ++i * i++; //
        System.out.println("i=" + i);
        System.out.println("j=" + j);
        System.out.println("k=" + k);

        new B().print();
    }

    static class A {
        public int i = 1;

        public int test() {
            System.out.println("A");
            return 1;
        }
    }

    static class B extends A {
        private int i = test();

        public int test() {
            System.out.println("B");
            return 2;
        }

        public void print() {
            System.out.println(this.i);
            System.out.println(super.i);
        }
    }
}
